<template>
  <div class="seckill-manage-view">
    <el-card class="box-card">
      <div class="time">
        当前时间：2021-01-18 11：30：00
        <el-button type="danger" size="medium">暂停交易</el-button>
        <el-button type="danger" size="medium">暂停上架</el-button>
      </div>
      <el-row :gutter="20">
        <el-col :span="7">
          抢购时间段：12：45
          <el-button type="primary" size="small">修改</el-button>
        </el-col>
        <el-col :span="7">
          待付款订单关闭：15分钟
          <el-button type="primary" size="small">修改</el-button>
        </el-col>
        <el-col :span="10">
          捡漏时间段：13：00-14：00
          <el-button type="primary" size="small">修改</el-button>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="7">
          自动确认收款时间：15：00
          <el-button type="primary" size="small">修改</el-button>
        </el-col>
        <el-col :span="7">
          截止上架时间：15：00
          <el-button type="primary" size="small">修改</el-button>
        </el-col>
        <el-col :span="10">
          确认收货时间下单后 X天 可确认收货： 3天
          <el-button type="primary" size="small">修改</el-button>
        </el-col>
      </el-row>
    </el-card>

    <ComplexTable :columns="columns" :list="tableList" :selection="true">
      <div class="slot-wrapper">
        <div class="operation-btn">
          <el-button type="primary" size="small">批量调拨</el-button>
          <el-button type="success" size="small">批量调拨</el-button>
          <el-button type="info" size="small">批量锁定</el-button>
          <el-button type="info" size="small">批量解锁</el-button>
        </div>
      </div>
    </ComplexTable>
  </div>
</template>

<script>
import ComplexTable from '@/components/ComplexTable'

export default {
  name: 'SeckillManage',
  components: { ComplexTable },

  data() {
    return {
      tableList: [
        {
          id: '201683',
          author: '宽心应是酒，遣兴莫过诗',
          price: '¥2000.00',
          status: '未售出',
          code: 132223111222311232,
          time: '2017-07-19 14:48:38',
          down: '15:00',
          sale: '张三  13099090999  详细',
          buy: '李四 18000000000 详细',
          space: '赜隐',
          goodstatus: '待付款',
          call: '是（待处理） 查看'
        }
      ]
    }
  },

  computed: {
    columns() {
      return [
        {
          label: '空间名称',
          prop: 'space'
        },
        {
          label: '商品ID',
          prop: 'id',
          fixed: 'left',
          search: 'input'
        },
        {
          label: '商品唯一编码',
          prop: 'sku'
        },
        {
          label: '商品唯一编码',
          prop: 'img'
        },
        {
          label: '商品名称',
          prop: 'author',
          search: 'input'
        },
        {
          label: '当前售价',
          prop: 'price'
        },
        {
          label: '初始价格',
          prop: 'noewwprice'
        },
        {
          label: '所属人',
          prop: 'pepole',
          search: 'input'
        },
        {
          label: '所属人手机号',
          prop: 'phone',
          search: 'input'
        },
        {
          label: '价格区间',
          prop: 'pricelabel'
        },
        {
          label: '商品状态',
          prop: 'goodstatus',
          search: 'select',
          options: [
            {
              label: '张三',
              value: '1'
            },
            {
              label: '李四',
              value: '2'
            }
          ]
        },
        {
          label: '操作',
          prop: 'operate',
          align: 'center',
          width: '300',
          fixed: 'right',
          render: (h, data) => {
            return (
              <div>
                <el-button size="mini">手动上架</el-button>
                <el-button size="mini">锁定</el-button>
                <el-button size="mini">调拨</el-button>
                <el-button size="mini">置换 </el-button>
              </div>
            )
          }
        }
      ]
    }
  },

  beforeMount() {
    console.log('asd')
  }
}
</script>

<style lang="scss">
@import './index';
</style>
